using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace LPrisaMVC.Entities
{
    public partial class VENTA
    {
        public VENTA()
        {
            this.DETALLEVENTAs = new List<DETALLEVENTA>();
        }

        public int Id { get; set; }
        [Display(Name = "ClienteId")]
        [Required(ErrorMessage = "El cliente es requerido")]
        [Range(1, 100000, ErrorMessage = "Debe cargar los datos completos del Cliente")]
        public int ClienteId { get; set; }

        [Display(Name = "Fecha")]
        [Required(ErrorMessage = "La fecha es requerida")]
        public System.DateTime Fecha { get; set; }

        [Display(Name = "Total")]
        [Required(ErrorMessage = "El Total es requerido")]
        [Range(0.1, 100000, ErrorMessage = "El Total debe ser mayor a 0")]
        public decimal Total { get; set; }

        [Display(Name = "ImpuestoId")]
        [Required(ErrorMessage = "El Impuesto es requerido")]
        [Range(1, 100000, ErrorMessage = "Debe elegir un Impuesto")]
        public int ImpuestoId { get; set; }

        public bool Cancelada { get; set; }

        [Display(Name = "IGV")]
        [Required(ErrorMessage = "El IGV es requerido")]
        public string IGV { get; set; }

        [Display(Name = "Factura")]
        public bool Factura { get; set; }

        public virtual CLIENTE CLIENTE { get; set; }
        public virtual List<DETALLEVENTA> DETALLEVENTAs { get; set; }
        public virtual IMPUESTO IMPUESTO { get; set; }
    }
}
